package com.wavehi.pojo;

import lombok.*;

/**
 * @Author WaveHi
 * @Date 25/8/2021 下午 7:11
 * @Version 1.0
 * @Contact HJBWaveHi@163.com
 * @Description Person class
 */
@Setter @Getter @NoArgsConstructor @AllArgsConstructor @ToString
public class Person {

    private String name;//姓名
    private int age;//年龄

    private Person(String name) {

        this.name = name;

    }

    /**
     * 呼吸
     */
    public void breathe() {

        say("Wow!");
        System.out.println("I am breathing.");

    }

    /**
     * 说话
     * @param message 所表述的话语
     */
    private void say(String message) {

        System.out.println(message);

    }

    /**
     * 打印信息
     * @param message 需要打印的信息
     */
    public void printMessage(String message) {
        System.out.println(message);
    }

}
